package com.yl.module.property.domain.vo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yl.module.file.domain.vo.File2VO;
import com.yl.module.property.domain.PropertyRunData;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 资产表 VO
 * @author yjc
 * @date 2024-10-23 15:54:15
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "PropertyInfoVO", description = "资产表详情VO")
public class PropertyInfoVO implements Serializable {
	private static final long serialVersionUID = 275195032746480908L;

	@ApiModelProperty(value = "资产表-主键id 资产编码")
	@TableId(value = "id", type = IdType.AUTO)
	private Integer id;

	@ApiModelProperty(value = "资产编码 例如SN编码这种")
	private String propertyCode;

	@ApiModelProperty(value = "资产一级分类id 来源property_type.id")
	private Integer propertyTypeId;

	@ApiModelProperty(value = "资产二级分类id 来源property_type.id")
	private Integer propertyTypeId2;

	@ApiModelProperty(value = "资产三级分类id 来源property_type.id")
	private Integer propertyTypeId3;

	@ApiModelProperty(value = "资产分类名称集 通过/进行分隔")
	private String propertyTypePathName;

	@ApiModelProperty(value = "资产名称")
	private String name;

	@ApiModelProperty(value = "资产品牌")
	private String brand;

	@ApiModelProperty(value = "是否在线 0否 1是 默认在线1")
	private Integer isOffline;

	@ApiModelProperty(value = "告警状态 0否 1是 默认无告警0")
	private Integer alarmState;

	@ApiModelProperty(value = "是否闲置 0否 1是 默认0")
	private Integer isIdle;

	@ApiModelProperty(value = "bim编码")
	private String bimCode;

	@ApiModelProperty(value = "ue编码")
	private String ueCode;

	@ApiModelProperty(value = "是否是智能设备 0否 1是 默认否0")
	private Integer isSmart;

	@ApiModelProperty(value = "安装日期")
	//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime installDate;

	@ApiModelProperty(value = "是否开启保养提醒 0否 1是 默认0")
	private Integer isMaintain;

	@ApiModelProperty(value = "保养周期(月)")
	private Integer maintainPeriod;

	@ApiModelProperty(value = "下次保养日期")
	//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime nextTimeMaintain;

	@ApiModelProperty(value = "是否开启更换提醒 0否 1是 默认0")
	private Integer isChange;

	@ApiModelProperty(value = "下次更换日期")
	//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime latelyChangeDate;

	@ApiModelProperty(value = "最近维修日期")
	//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime latelyUpkeep;

	@ApiModelProperty(value = "质保期 例如一个月 三年 十年")
	private String warranty;

	@ApiModelProperty(value = "使用年限")
	private String durableYears;

	@ApiModelProperty(value = "状态 正常1 告警2 离线3")
	private Integer state;

	@ApiModelProperty(value = "保养状态 无保养1 即将保养2 保养超期3")
	private Integer maintainState;

	@ApiModelProperty(value = "更换状态 无更换1 即将更换2 更换超期3")
	private Integer changeState;



	@ApiModelProperty(value = "资产属性参数")
	private PropertyRunData.DeviceAttribute deviceRunData;

	@ApiModelProperty(value = "近30日告警数")
	private Long recently30AlarmNum;

	@ApiModelProperty(value = "近30日维修记录数")
	private Long recently30UpkeepNum;

	@ApiModelProperty(value = "文件")
	private List<File2VO> files;

}

